<CFPARAM NAME="folderBODYCOLOR" DEFAULT="##EFEFEF">
<CFPARAM NAME="folderUNSELCOLOR" DEFAULT="Silver">
<CFPARAM NAME="folderBODYWIDTH" DEFAULT="100%">
<CFPARAM NAME="folderBODYLEFTMARGIN" DEFAULT="0px">
<CFPARAM NAME="folderBODYRIGHTMARGIN" DEFAULT="0px">
<CFPARAM NAME="folderTOPBOTTOMMARGIN" DEFAULT="0px">
<CFPARAM NAME="folderINNERWIDTH" DEFAULT="100%">
<CFPARAM NAME="folderINNERTRBLMARGIN" DEFAULT="2px 2px 2px 2px">
<CFPARAM NAME="folderOPENFOLDER" DEFAULT=1>
<CFPARAM NAME="folderANCHORCOLOR" DEFAULT="Navy">
<CFPARAM NAME="folderCURRENT" DEFAULT="1">
<CFPARAM NAME="wsActionEnc" DEFAULT="edit">
<CFIF isDefined("url.currfolder")>
	<CFSET folderCURRENT=DECRYPT(url.currfolder,client.ek)>
</CFIF>
<CFSET view="">
<CFIF isDefined("url.view")>
	<CFSET view="&view=">
</CFIF>
<CFOUTPUT>
<table cellpadding="0" cellspacing="1px" border="0" bgcolor="#folderBODYCOLOR#" width="#folderBODYWIDTH#" style="margin-left: #folderBODYLEFTMARGIN#; margin-right: #folderBODYRIGHTMARGIN#;">
<CFIF folderTOPBOTTOMMARGIN IS "0px">
<tr><td height="#folderTOPBOTTOMMARGIN#"></td></tr>
</cfif>
<tr>
	<CFSET nFolderCount=0>
	<CFSET sBGColor=folderBODYCOLOR>
	<CFLOOP LIST="#folderLISTFOLDERNAME#" INDEX="FolderName">
		<CFSET nFolderCount=nFolderCount + 1>
		<td nowrap id="tab#nFolderCount#" bgcolor="#sBGColor#" class="Tab">
		<CFSET sFolder = URLEncodedFormat(encrypt(nFolderCount,client.ek))>
			<a href="#getFileFromPath(getBaseTemplatePath())#?id=#sIDUrlEnc#&wsnum=#wsIDnumEnc#&appNo=#encAppActive#&currfolder=#sFolder#&myAction=#wsActionEnc##view#">
				<span style="text-decoration: none; color: #folderANCHORCOLOR#">
					<center>#FolderName#</center>
				</span>
			</a>
		</td>
		<CFSET sBGColor=folderUNSELCOLOR>
		<div id="folderBody#nFolderCount#" class="#sBGColor#"></div>
	</CFLOOP>

	<td width="#folderEXCESS#" height="#folderTAGHEIGHT#"></td>
</tr>
<tr>
	<CFSET sBGColor=folderBODYCOLOR>

	<CFLOOP INDEX="LoopCount" FROM="1" TO="#nFolderCount#">
		<td id="folder#LoopCount#" bgcolor="#sBGColor#"></td>
		<CFSET sBGColor="Snow">
	</CFLOOP>

	<td width="#folderEXCESS#" height="2px" bgcolor="Snow"></td>
</tr>
<CFSET nFolderCount=nFolderCount + 1>
<tr>
<td colspan="#nFolderCount#" style="border-left: 2px solid Snow; border-right: 2px solid Gray; border-bottom: 2px solid Gray;">
	<table cellpadding="0" cellspacing="0" border="0" bgcolor="#folderBODYCOLOR#" width="#folderINNERWIDTH#"
		style="border-bottom: 2px solid Snow; border-right: 2px solid Snow; border-top: 2px solid Gray; border-left: 2px solid Gray; margin: #folderINNERTRBLMARGIN#;">
	<tr>
	<td class="FolderBodyActive">
		<CFSET theFolderinclude=ListGetAt(folderLISTFOLDERINCLUDE,folderCURRENT)>			
		<CFINCLUDE TEMPLATE="#folderBASEPATH##theFolderinclude#.cfm">
	</td>
	</tr>
	</table>
</td>
</tr>
<CFIF folderTOPBOTTOMMARGIN IS "0px">
<tr><td height="#folderTOPBOTTOMMARGIN#"></td></tr>
</CFIF>
</table>
</CFOUTPUT>

<script>
// Global Variable
var nCurrFolder=1
<CFOUTPUT>
ChangeFolder(#folderCURRENT#, '#folderBODYCOLOR#', '#folderUNSELCOLOR#');
</CFOUTPUT>

function ChangeFolder(nFolder, sBodyColor, sUnselectColor) {
var oFolder
	eval("document.getElementById('folder" + nCurrFolder + "')").bgColor="Snow"
	eval("document.getElementById('folder" + nFolder + "')").bgColor=sBodyColor
	eval("document.getElementById('folderBody" + nCurrFolder + "')").style.display="none"
	eval("document.getElementById('folderBody" + nFolder + "')").style.display="block"

	if (nCurrFolder != 1)
		eval("document.getElementById('tab" + (nCurrFolder - 1) + "')").style.borderRightColor="Gray"

	if (nFolder != 1)
		eval("document.getElementById('tab" + (nFolder - 1) + "')").style.borderRightColor="Silver"

	eval("document.getElementById('tab" + nCurrFolder + "')").bgColor=sUnselectColor
	eval("document.getElementById('tab" + nFolder + "')").bgColor=sBodyColor
	nCurrFolder=nFolder
}
</script>
